\documentclass{article}
\author{Peter Davoust \and Clement Gehring}
\title{Ghostcrab Planning Documentation}
\begin{document}
\maketitle
\section{Items}
\subsection*{Introduction}
The purpose of this section is to layout broad-level "things" that should exist in the world, and what properties we need to keep track of. For example, for missiles, we need to keep track of their strength, range, targetting factor, and speed. We don't give a damn about their color, materials, or whether they were made by Joe the Plumber.

\subsection{Missiles}
\begin{itemize}
\item Strength
\item Range
\item Targetting - an arbitrary factor that affects the probability of hitting a given target
\item Speed
\end{itemize}

\subsection{Weapons}
Weapons have priority; their damage is inflicted before that of missiles, flying monkeys, or anything else.
\begin{itemize}
\item Range
\item Strength
\end{itemize}

\subsection{Component - Abstract Class}
This is an Abstract Class, implemented by all objects capable of being damaged.
\begin{itemize}
\item Damage - How damaged is the component now?
\item Resistance - How resistant is the component to damage?
\end{itemize}

\section{Battles}
\subsection*{Introduction}
This section lays out how exactly battles take place, how damage is calculated, which methods of attack are launched in what situations, and anything else relating to one ship knocking the living shite out of another.

\subsection{Missiles}
Missiles are used in long-range combat; one ship does not necessarily have to be right next to another to shoot it with a missile. Missiles, however, are used to destroy a ship, and are not used when taking a ship over.

\subsection{Weapons}
Weapons are used in close range, and can be used when taking over a ship. Here are the key points that make Weapons different from missiles:
\begin{itemize}
\item The defending ship gets to decide whether to retreat or engage before fire is exchanged.
\item After fire is exchanged, both ships decide whether to leave or to stay. 
\end{itemize}

\subsection{Damage Calculation}
Damage calculation happens more or less the same way, whether the attack is done via weapons or missiles. Damage is a function of Resistance, Missile Strength, and a random factor. The following table defines how damage is assigned to various components. \\
\begin{tabular}{|c|c|}
\hline
Event & Probability \\
\hline
Ship is Hit & $P(Hit Ship | Missile Speed, Ship Speed, Defenses)$ \\
\hline
Component is Hit & $P(Hit Component | Hit Ship=1,Targeting, Ship Speed)$\\
\hline
Nearby Component is Hit* & $ 1-P(Component is Hit)$\\
\hline
\end{tabular}
*If a component is not hit, then another random component will be hit according to a normal distribution.

\subsection{Fire Exchange}
Fire exchange happens in order of range for each weapon involved in the exchange of fire.

\section{Classes}
\
\end{document}